Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-core-utils

Package Overview
Dependencies
Maintainers
14
Versions
363
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-core-utils

A collection of gatsby utils used in different gatsby packages

  • 1.10.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
415K
decreased by-15.8%
Maintainers
14
Weekly downloads
 
Created

What is gatsby-core-utils?

The gatsby-core-utils package provides a set of utility functions that are commonly used in Gatsby projects. These utilities help with various tasks such as file system operations, URL handling, and more.

What are gatsby-core-utils's main functionalities?

createContentDigest

This utility function creates a content digest (hash) for a given input. It is useful for generating unique identifiers for content.

const { createContentDigest } = require('gatsby-core-utils');
const data = { key: 'value' };
const digest = createContentDigest(data);
console.log(digest);

cpuCoreCount

This function returns the number of CPU cores available on the machine. It can be useful for optimizing parallel tasks.

const { cpuCoreCount } = require('gatsby-core-utils');
const coreCount = cpuCoreCount();
console.log(coreCount);

isCI

This utility checks if the code is running in a Continuous Integration (CI) environment. It can be used to conditionally execute code based on the environment.

const { isCI } = require('gatsby-core-utils');
if (isCI()) {
  console.log('Running in a CI environment');
} else {
  console.log('Not running in a CI environment');
}

Other packages similar to gatsby-core-utils

Keywords

FAQs

Package last updated on 24 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc